package org.example.ch02.p06;

import java.math.BigInteger;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        BigInteger sum = new BigInteger("0");
        while (true) {
            String input = scanner.nextLine().trim();
            if (input.equalsIgnoreCase("e")) {
                break;
            }
            BigInteger number = new BigInteger(input);
            sum = sum.add(number);
        }
        System.out.println(sum.toString());
    }
}
